Conventional communication networks allow network devices to exchange packets of information, or network packets, with one another. For example, one personal computer connected to a network may transmit packets to another personal computer that is also connected to the network. Certain types of network devices are used to facilitate the exchange of network packets between other network devices. A network switch or router may receive streams of network packets from other network devices, such as personal computers and handheld devices, process the packets, and forward the packets to appropriate other network devices, including other network switches or routers. The network packets may be received and forwarded by several network devices until they reach an appropriate destination.
A network packet may include actual data intended for transmission and data appended thereto for network purposes. The former type of data will be referred to herein as “data” and the latter type will be referred to as “header information”. Such header information may include, among other information, a source address, a destination address, a source port and a destination port. A network packet may be processed and forwarded based on its header information.
According to some environments, distinct portions of header information are associated with each of the link, network, transport and application layers of a seven-layer ISO OSI protocol stack. In this regard, header information for each layer is successively appended to a packet's data before it is transmitted. Each successively-appended portion of header information may be considered a separate header. Header information of a network packet may therefore be seen to include a link layer header, a network layer header, etc.
FIG. 1 illustrates a conventional network packet as stored in a memory upon receipt by a network device. The FIG. 1 packet includes a link layer header and a network layer header appended to the packet's data. As shown, the link layer is a point-to-point protocol (PPP) layer and the network layer is an Internet Protocol (IP) layer. The represented packet is therefore a “IP over PPP” packet. FIG. 2 also illustrates a received and stored network packet. The FIG. 2 packet is an “IP over Ethernet” packet. As such, the associated data link layer is IP and the associated network layer is Ethernet.
According to some systems, the minimum burst size for accessing the FIG. 1 and FIG. 2 memory is eight bytes. Consequently, the memory is accessible on a quad word (64 bit) boundary. Neither the FIG. 1 nor the FIG. 2 network layer headers are aligned with a quad word boundary. Rather, the FIG. 1 network layer header is offset from a quad word boundary (0x2000) by two bytes and the FIG. 2 network layer is offset from a quad word boundary (0x2008) by six bytes.
A conventional system may include several processing units for processing a network layer header of a received packet. However, each of these units must somehow extract and align the network layer header with an accessible memory boundary before processing the network layer header. Each unit must also unalign the header after completion of its processing.